import request from '@/utils/request'

export function addUser(data) {
  return request({
    url: 'api/backend/user/add',
    method: 'post',
    data
  })
}

export function queryList(params) {
  return request({
    url: 'api/backend/user/page',
    method: 'get',
    params
  })
}

export function user(id) {
  return request({
    url: `api/backend/user/${id}`,
    method: 'get'
  })
}

export function editUser(data) {
  return request({
    url: `api/backend/user/update`,
    method: 'put',
    data
  })
}
export function deltUser(id) {
  return request({
    url: `api/backend/user/${id}`,
    method: 'delete',
  })
}
export function logtUser(data) {
  return request({
    url: `api/app/user/close`,
    method: 'put',
    data
  })
}
